<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
class Photo extends Model
{
	//指定表名
	protected $table='photo';
	//指定id
	protected $primaryKey ='id';
	//自动维护时间戳
	public $timestamps= true;

    // 日期都存储为时间戳
    protected $dateFormat = 'U';
	
	public function tags(){
		return $this->belongsTo('App\Tags','tag_id');
	}
	public function cafe(){
		return $this->belongsTo('App\Cafe','cafe_id');
	}

   
}
